2025-03-24 16:08:44,681 - INFO - Num classes: 3
2025-03-24 16:14:37,317 - INFO - Class weights: tensor([0.5161, 4.2842, 1.2065], device='cuda:0')
2025-03-24 16:14:37,366 - INFO - Model architecture:
CombinedModelCNN(
  (unet): Unet(
    (conv1): Sequential(
      (0): Conv2d(1080, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv2): Sequential(
      (0): Conv2d(8, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv3): Sequential(
      (0): Conv2d(16, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(32, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (upconv3): Sequential(
      (0): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(16, 16, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv2): Sequential(
      (0): Conv2d(32, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(8, 8, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv1): Sequential(
      (0): Conv2d(16, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(3, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(3, 3, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
  )
  (san): ImprovedHyperspectralLogisticRegressionModel(
    (spectral_attention): SpectralAttention(
      (fc): Sequential(
        (0): Linear(in_features=1080, out_features=67, bias=True)
        (1): ReLU(inplace=True)
        (2): Linear(in_features=67, out_features=1080, bias=True)
        (3): Sigmoid()
      )
    )
    (linear): Sequential(
      (0): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=1080, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (1): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=20, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (2): Linear(in_features=20, out_features=3, bias=True)
    )
    (logistic): Linear(in_features=3, out_features=3, bias=True)
  )
  (cnn): Sequential(
    (0): Conv2d(6, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (1): ReLU(inplace=True)
    (2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (3): Dropout2d(p=0.2, inplace=False)
    (4): Conv2d(64, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (5): ReLU(inplace=True)
    (6): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (7): Dropout2d(p=0.2, inplace=False)
    (8): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (9): ReLU(inplace=True)
    (10): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (11): Dropout2d(p=0.2, inplace=False)
    (12): Conv2d(16, 3, kernel_size=(1, 1), stride=(1, 1))
  )
)
2025-03-24 16:14:37,366 - INFO - Using cuda device
2025-03-24 16:23:47,255 - INFO - Epoch: 0/100. Training time: 364.584
2025-03-24 16:23:47,257 - INFO - Training Metrics...
2025-03-24 16:23:47,258 - INFO - {'loss': 0.8668889968823164, 'f1': 53.080847911024605, 'acc': 60.67445157149398, 'precision': 54.22258306997361, 'recall': 63.15563344698649, 'balanced acc': 63.15563344698649}
2025-03-24 16:23:47,258 - INFO - Validation Metrics... Inference time: 185.295
2025-03-24 16:23:47,258 - INFO - {'loss': 0.8572441890269895, 'f1': 70.316939190938, 'acc': 77.39380166623612, 'precision': 73.07072136733645, 'recall': 70.62710748858642, 'balanced acc': 70.62710748858642}
2025-03-24 16:23:47,259 - INFO - ==================================================
2025-03-24 17:09:11,804 - INFO - Epoch: 5/100. Training time: 352.735
2025-03-24 17:09:11,807 - INFO - Training Metrics...
2025-03-24 17:09:11,808 - INFO - {'loss': 0.5583476454783709, 'f1': 73.58363227367187, 'acc': 82.65620400804553, 'precision': 71.42999575414628, 'recall': 81.61464384385044, 'balanced acc': 81.61464384385044}
2025-03-24 17:09:11,808 - INFO - Validation Metrics... Inference time: 186.217
2025-03-24 17:09:11,808 - INFO - {'loss': 0.6597864937178696, 'f1': 74.16448075223563, 'acc': 78.66991733402223, 'precision': 75.11476093624707, 'recall': 76.77579409739421, 'balanced acc': 76.77579409739421}
2025-03-24 17:09:11,808 - INFO - ==================================================
2025-03-24 17:58:52,390 - INFO - Epoch: 10/100. Training time: 376.432
2025-03-24 17:58:52,394 - INFO - Training Metrics...
2025-03-24 17:58:52,395 - INFO - {'loss': 0.5520381300877302, 'f1': 73.13748921206027, 'acc': 82.0401545534079, 'precision': 70.9393496311109, 'recall': 80.73340753275347, 'balanced acc': 80.73340753275347}
2025-03-24 17:58:52,395 - INFO - Validation Metrics... Inference time: 201.706
2025-03-24 17:58:52,395 - INFO - {'loss': 0.684716280502609, 'f1': 73.30336656300355, 'acc': 77.61618343935677, 'precision': 74.30823600357846, 'recall': 76.35589682615715, 'balanced acc': 76.35589682615715}
2025-03-24 17:58:52,395 - INFO - ==================================================
2025-03-24 18:48:50,773 - INFO - Epoch: 15/100. Training time: 419.080
2025-03-24 18:48:50,776 - INFO - Training Metrics...
2025-03-24 18:48:50,777 - INFO - {'loss': 0.5478912867032565, 'f1': 72.82290018519005, 'acc': 82.18716272566718, 'precision': 71.58898816297426, 'recall': 79.99152413958596, 'balanced acc': 79.99152413958596}
2025-03-24 18:48:50,777 - INFO - Validation Metrics... Inference time: 201.777
2025-03-24 18:48:50,778 - INFO - {'loss': 0.6505488036554071, 'f1': 73.43529470975483, 'acc': 77.83182942876518, 'precision': 74.35236416294845, 'recall': 76.38030754341476, 'balanced acc': 76.38030754341476}
2025-03-24 18:48:50,778 - INFO - ==================================================
2025-03-24 19:39:04,006 - INFO - Epoch: 20/100. Training time: 372.219
2025-03-24 19:39:04,009 - INFO - Training Metrics...
2025-03-24 19:39:04,013 - INFO - {'loss': 0.4885227137651199, 'f1': 74.42692913698578, 'acc': 84.80806535354526, 'precision': 73.63139778608905, 'recall': 82.73948001604532, 'balanced acc': 82.73948001604532}
2025-03-24 19:39:04,013 - INFO - Validation Metrics... Inference time: 193.418
2025-03-24 19:39:04,013 - INFO - {'loss': 0.6277314673496198, 'f1': 74.07405565102786, 'acc': 78.3842898314389, 'precision': 74.8816442151255, 'recall': 77.01927539571794, 'balanced acc': 77.01927539571794}
2025-03-24 19:39:04,013 - INFO - ==================================================
2025-03-24 20:33:28,937 - INFO - Epoch: 25/100. Training time: 472.411
2025-03-24 20:33:28,940 - INFO - Training Metrics...
2025-03-24 20:33:28,940 - INFO - {'loss': 0.5203573245268601, 'f1': 73.26551705578255, 'acc': 83.98799047864338, 'precision': 72.04090010361641, 'recall': 82.90964391737478, 'balanced acc': 82.90964391737478}
2025-03-24 20:33:28,940 - INFO - Validation Metrics... Inference time: 263.119
2025-03-24 20:33:28,940 - INFO - {'loss': 0.6171417530578903, 'f1': 74.8795595762097, 'acc': 79.35446973488763, 'precision': 76.05363128012743, 'recall': 77.34529861915146, 'balanced acc': 77.34529861915146}
2025-03-24 20:33:28,940 - INFO - ==================================================
2025-03-24 21:35:18,303 - INFO - Epoch: 30/100. Training time: 482.849
2025-03-24 21:35:18,306 - INFO - Training Metrics...
2025-03-24 21:35:18,307 - INFO - {'loss': 0.5320611703090179, 'f1': 71.84815050175686, 'acc': 81.08585982469911, 'precision': 70.47291455693613, 'recall': 81.12478651210098, 'balanced acc': 81.12478651210098}
2025-03-24 21:35:18,307 - INFO - Validation Metrics... Inference time: 256.025
2025-03-24 21:35:18,307 - INFO - {'loss': 0.6061257833166968, 'f1': 74.05564180744456, 'acc': 78.51315268987342, 'precision': 75.15007165620324, 'recall': 77.0375138336847, 'balanced acc': 77.0375138336847}
2025-03-24 21:35:18,307 - INFO - ==================================================
2025-03-24 22:36:47,859 - INFO - Epoch: 35/100. Training time: 479.370
2025-03-24 22:36:47,862 - INFO - Training Metrics...
2025-03-24 22:36:47,863 - INFO - {'loss': 0.5223445082322146, 'f1': 71.18905186950315, 'acc': 81.41843275771848, 'precision': 69.99329373380087, 'recall': 80.56062128179032, 'balanced acc': 80.56062128179032}
2025-03-24 22:36:47,863 - INFO - Validation Metrics... Inference time: 256.390
2025-03-24 22:36:47,863 - INFO - {'loss': 0.6108882276317741, 'f1': 73.92718670214865, 'acc': 78.46322716190906, 'precision': 74.53027996731886, 'recall': 76.86750231685335, 'balanced acc': 76.86750231685335}
2025-03-24 22:36:47,863 - INFO - ==================================================
2025-03-24 23:38:52,842 - INFO - Epoch: 40/100. Training time: 493.874
2025-03-24 23:38:52,845 - INFO - Training Metrics...
2025-03-24 23:38:52,846 - INFO - {'loss': 0.4618746286783463, 'f1': 73.82706924533312, 'acc': 83.73891849408032, 'precision': 72.36015122851983, 'recall': 83.97132076620343, 'balanced acc': 83.97132076620343}
2025-03-24 23:38:52,846 - INFO - Validation Metrics... Inference time: 258.630
2025-03-24 23:38:52,846 - INFO - {'loss': 0.6204735432999043, 'f1': 73.81102841930806, 'acc': 78.3348184012529, 'precision': 74.10465785966272, 'recall': 77.11761886547333, 'balanced acc': 77.11761886547333}
2025-03-24 23:38:52,846 - INFO - ==================================================
2025-03-25 00:51:31,867 - INFO - Epoch: 45/100. Training time: 547.806
2025-03-25 00:51:31,870 - INFO - Training Metrics...
2025-03-25 00:51:31,871 - INFO - {'loss': 0.46516908896275055, 'f1': 74.68752421568365, 'acc': 83.09942591820382, 'precision': 73.28889411542023, 'recall': 82.88698009556043, 'balanced acc': 82.88698009556043}
2025-03-25 00:51:31,871 - INFO - Validation Metrics... Inference time: 295.108
2025-03-25 00:51:31,871 - INFO - {'loss': 0.6014954824990864, 'f1': 72.80960628580075, 'acc': 77.06112458828468, 'precision': 73.27992512216828, 'recall': 76.16530222109766, 'balanced acc': 76.16530222109766}
2025-03-25 00:51:31,871 - INFO - ==================================================
2025-03-25 01:05:39,237 - INFO - Early stopping criterion met. Stopping training.
2025-03-25 01:05:40,156 - INFO - Initializing final Evaluations:

2025-03-25 01:10:23,655 - INFO - Final validation metrics:
{'f1': 75.75864838644692, 'acc': 79.35446973488763, 'precision': 74.64954935144867, 'recall': 78.2018598692143, 'balanced acc': 78.2018598692143}
2025-03-25 01:13:01,561 - INFO - Final test pixel-wise classification metrics:
{'f1': 80.41550940798177, 'acc': 82.99111931578746, 'precision': 79.47239003486251, 'recall': 82.66798602328991, 'balanced acc': 82.66798602328991}
2025-04-05 02:29:56,264 - INFO - Num classes: 3
2025-04-05 02:29:56,267 - INFO - Class weights: None
2025-04-05 02:29:56,434 - INFO - Model architecture:
CombinedModelCNN(
  (unet): Unet(
    (conv1): Sequential(
      (0): Conv2d(1080, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(3, 3), stride=(1, 1), padding=(5, 5))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv2): Sequential(
      (0): Conv2d(8, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (conv3): Sequential(
      (0): Conv2d(16, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(32, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
    )
    (upconv3): Sequential(
      (0): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(16, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(16, 16, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv2): Sequential(
      (0): Conv2d(32, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(8, 8, kernel_size=(4, 4), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(8, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(8, 8, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
    (upconv1): Sequential(
      (0): Conv2d(16, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (1): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (2): ReLU()
      (3): Conv2d(3, 3, kernel_size=(7, 7), stride=(1, 1), padding=(1, 1))
      (4): BatchNorm2d(3, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      (5): ReLU()
      (6): ConvTranspose2d(3, 3, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), output_padding=(1, 1))
    )
  )
  (san): ImprovedHyperspectralLogisticRegressionModel(
    (spectral_attention): SpectralAttention(
      (fc): Sequential(
        (0): Linear(in_features=1080, out_features=67, bias=True)
        (1): ReLU(inplace=True)
        (2): Linear(in_features=67, out_features=1080, bias=True)
        (3): Sigmoid()
      )
    )
    (linear): Sequential(
      (0): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=1080, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (1): LinearBlock(
        (block): Sequential(
          (0): Linear(in_features=20, out_features=20, bias=True)
          (1): BatchNorm1d(20, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
          (2): LeakyReLU(negative_slope=0.1)
          (3): Dropout(p=0.0, inplace=False)
        )
      )
      (2): Linear(in_features=20, out_features=3, bias=True)
    )
    (logistic): Linear(in_features=3, out_features=3, bias=True)
  )
  (cnn): Sequential(
    (0): Conv2d(6, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (1): ReLU(inplace=True)
    (2): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (3): Dropout2d(p=0.2, inplace=False)
    (4): Conv2d(64, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (5): ReLU(inplace=True)
    (6): BatchNorm2d(32, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (7): Dropout2d(p=0.2, inplace=False)
    (8): Conv2d(32, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
    (9): ReLU(inplace=True)
    (10): BatchNorm2d(16, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
    (11): Dropout2d(p=0.2, inplace=False)
    (12): Conv2d(16, 3, kernel_size=(1, 1), stride=(1, 1))
  )
)
2025-04-05 02:29:56,434 - INFO - Using cuda device
2025-04-05 02:29:56,471 - INFO - Initializing final Evaluations:

